//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if compiler(>=5.5.2) && canImport(_Concurrency)

import SotoCore

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension IoTRoboRunner {
    // MARK: Async API Calls

    /// Grants permission to create a destination
    public func createDestination(_ input: CreateDestinationRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> CreateDestinationResponse {
        return try await self.client.execute(operation: "CreateDestination", path: "/createDestination", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to create a site
    public func createSite(_ input: CreateSiteRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> CreateSiteResponse {
        return try await self.client.execute(operation: "CreateSite", path: "/createSite", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to create a worker
    public func createWorker(_ input: CreateWorkerRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> CreateWorkerResponse {
        return try await self.client.execute(operation: "CreateWorker", path: "/createWorker", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to create a worker fleet
    public func createWorkerFleet(_ input: CreateWorkerFleetRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> CreateWorkerFleetResponse {
        return try await self.client.execute(operation: "CreateWorkerFleet", path: "/createWorkerFleet", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to delete a destination
    public func deleteDestination(_ input: DeleteDestinationRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> DeleteDestinationResponse {
        return try await self.client.execute(operation: "DeleteDestination", path: "/deleteDestination", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to delete a site
    public func deleteSite(_ input: DeleteSiteRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> DeleteSiteResponse {
        return try await self.client.execute(operation: "DeleteSite", path: "/deleteSite", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to delete a worker
    public func deleteWorker(_ input: DeleteWorkerRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> DeleteWorkerResponse {
        return try await self.client.execute(operation: "DeleteWorker", path: "/deleteWorker", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to delete a worker fleet
    public func deleteWorkerFleet(_ input: DeleteWorkerFleetRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> DeleteWorkerFleetResponse {
        return try await self.client.execute(operation: "DeleteWorkerFleet", path: "/deleteWorkerFleet", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to get a destination
    public func getDestination(_ input: GetDestinationRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> GetDestinationResponse {
        return try await self.client.execute(operation: "GetDestination", path: "/getDestination", httpMethod: .GET, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to get a site
    public func getSite(_ input: GetSiteRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> GetSiteResponse {
        return try await self.client.execute(operation: "GetSite", path: "/getSite", httpMethod: .GET, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to get a worker
    public func getWorker(_ input: GetWorkerRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> GetWorkerResponse {
        return try await self.client.execute(operation: "GetWorker", path: "/getWorker", httpMethod: .GET, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to get a worker fleet
    public func getWorkerFleet(_ input: GetWorkerFleetRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> GetWorkerFleetResponse {
        return try await self.client.execute(operation: "GetWorkerFleet", path: "/getWorkerFleet", httpMethod: .GET, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to list destinations
    public func listDestinations(_ input: ListDestinationsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> ListDestinationsResponse {
        return try await self.client.execute(operation: "ListDestinations", path: "/listDestinations", httpMethod: .GET, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to list sites
    public func listSites(_ input: ListSitesRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> ListSitesResponse {
        return try await self.client.execute(operation: "ListSites", path: "/listSites", httpMethod: .GET, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to list worker fleets
    public func listWorkerFleets(_ input: ListWorkerFleetsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> ListWorkerFleetsResponse {
        return try await self.client.execute(operation: "ListWorkerFleets", path: "/listWorkerFleets", httpMethod: .GET, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to list workers
    public func listWorkers(_ input: ListWorkersRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> ListWorkersResponse {
        return try await self.client.execute(operation: "ListWorkers", path: "/listWorkers", httpMethod: .GET, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to update a destination
    public func updateDestination(_ input: UpdateDestinationRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> UpdateDestinationResponse {
        return try await self.client.execute(operation: "UpdateDestination", path: "/updateDestination", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to update a site
    public func updateSite(_ input: UpdateSiteRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> UpdateSiteResponse {
        return try await self.client.execute(operation: "UpdateSite", path: "/updateSite", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to update a worker
    public func updateWorker(_ input: UpdateWorkerRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> UpdateWorkerResponse {
        return try await self.client.execute(operation: "UpdateWorker", path: "/updateWorker", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }

    /// Grants permission to update a worker fleet
    public func updateWorkerFleet(_ input: UpdateWorkerFleetRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> UpdateWorkerFleetResponse {
        return try await self.client.execute(operation: "UpdateWorkerFleet", path: "/updateWorkerFleet", httpMethod: .POST, serviceConfig: self.config, input: input, logger: logger, on: eventLoop)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension IoTRoboRunner {
    ///  Grants permission to list destinations
    /// Return PaginatorSequence for operation.
    ///
    /// - Parameters:
    ///   - input: Input for request
    ///   - logger: Logger used flot logging
    ///   - eventLoop: EventLoop to run this process on
    public func listDestinationsPaginator(
        _ input: ListDestinationsRequest,
        logger: Logger = AWSClient.loggingDisabled,
        on eventLoop: EventLoop? = nil
    ) -> AWSClient.PaginatorSequence<ListDestinationsRequest, ListDestinationsResponse> {
        return .init(
            input: input,
            command: self.listDestinations,
            inputKey: \ListDestinationsRequest.nextToken,
            outputKey: \ListDestinationsResponse.nextToken,
            logger: logger,
            on: eventLoop
        )
    }

    ///  Grants permission to list sites
    /// Return PaginatorSequence for operation.
    ///
    /// - Parameters:
    ///   - input: Input for request
    ///   - logger: Logger used flot logging
    ///   - eventLoop: EventLoop to run this process on
    public func listSitesPaginator(
        _ input: ListSitesRequest,
        logger: Logger = AWSClient.loggingDisabled,
        on eventLoop: EventLoop? = nil
    ) -> AWSClient.PaginatorSequence<ListSitesRequest, ListSitesResponse> {
        return .init(
            input: input,
            command: self.listSites,
            inputKey: \ListSitesRequest.nextToken,
            outputKey: \ListSitesResponse.nextToken,
            logger: logger,
            on: eventLoop
        )
    }

    ///  Grants permission to list worker fleets
    /// Return PaginatorSequence for operation.
    ///
    /// - Parameters:
    ///   - input: Input for request
    ///   - logger: Logger used flot logging
    ///   - eventLoop: EventLoop to run this process on
    public func listWorkerFleetsPaginator(
        _ input: ListWorkerFleetsRequest,
        logger: Logger = AWSClient.loggingDisabled,
        on eventLoop: EventLoop? = nil
    ) -> AWSClient.PaginatorSequence<ListWorkerFleetsRequest, ListWorkerFleetsResponse> {
        return .init(
            input: input,
            command: self.listWorkerFleets,
            inputKey: \ListWorkerFleetsRequest.nextToken,
            outputKey: \ListWorkerFleetsResponse.nextToken,
            logger: logger,
            on: eventLoop
        )
    }

    ///  Grants permission to list workers
    /// Return PaginatorSequence for operation.
    ///
    /// - Parameters:
    ///   - input: Input for request
    ///   - logger: Logger used flot logging
    ///   - eventLoop: EventLoop to run this process on
    public func listWorkersPaginator(
        _ input: ListWorkersRequest,
        logger: Logger = AWSClient.loggingDisabled,
        on eventLoop: EventLoop? = nil
    ) -> AWSClient.PaginatorSequence<ListWorkersRequest, ListWorkersResponse> {
        return .init(
            input: input,
            command: self.listWorkers,
            inputKey: \ListWorkersRequest.nextToken,
            outputKey: \ListWorkersResponse.nextToken,
            logger: logger,
            on: eventLoop
        )
    }
}

#endif // compiler(>=5.5.2) && canImport(_Concurrency)
